<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台管理面板</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    {include file="common/top" /}
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <div class="content-wrapper" style="margin-left: 0 !important;">
        <!--页眉-->
        <section class="content-header">
            <h1>
                <!--首页-->
                <small><i class="fa fa-dashboard"></i> </small>
            </h1>
            <ol class="breadcrumb">
                <!--<li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>-->
                <li class="active"></li>
            </ol>
        </section>
        <!--内容开始-->
        <section class="content">

            <form method="post" id="form_data">
                <input type="hidden" name="id" value="{$Info.id}">
                <!---->
                <div class="row">
                    <div class="col-sm-12 col-xs-12">
                        <div class="box box-body">
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">志愿活动名</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="name" value="{$Info.name}" class="form-control" placeholder="志愿活动名">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">志愿标题</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="title" class="form-control" value="{$Info.title}" placeholder="志愿标题">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">活动关键字</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="keyname"  value="{$Info.keyname}" class="form-control" placeholder="活动关键字">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">活动简述</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="pro_description" value="{$Info.pro_description}" class="form-control" placeholder="活动简述">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>


                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">项目负责人</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="leading" value="{$Info.leading}" class="form-control" placeholder="项目负责人">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>

                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">负责人手机号</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="leading_phone" value="{$Info.leading_phone}" class="form-control" placeholder="负责人手机号">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>

                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">该项目服务时长</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="service_time" value="{$Info.service_time}" class="form-control" placeholder="该项目服务时长">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>

                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">招募人数</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="need_people"  value="{$Info.need_people}" class="form-control" placeholder="招募人数">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>

                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">获得积分</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="integral"  value="{$Info.integral}" class="form-control" placeholder="获得积分">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>


                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">活动缩略图</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="show_img" class="form-control" value="{$Info.show_img}" placeholder="活动缩略图" >
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                        <button type="button" class="layui-btn show_img">
                                            <i class="layui-icon">&#xe67c;</i>上传文件
                                        </button>
                                    </div>
                                </div>
                            </div>




                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <div class="col-xs-12 col-sm-11 col-md-10 col-lg-8">
                                        <label class="text-lable">正文内容</label>
                                        <!-- class="form-control" -->
                                        <textarea  name="content" id="content" rows="15" placeholder="请输入内容">{$Info.content}</textarea>
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
                                        <button type="button" class="btn btn-flat btn-primary " id="button">提 交</button>
                                        <button type="button" class="btn btn-flat btn-default" onclick="javascript :history.back(-1)">返 回
                                        </button>
                                    </div>

                                </div>
                            </div>
                        </div>
                        <!-- /.box -->
                    </div>
                </div>
            </form>

    </div>
    <!-- /.row (main row) -->

    </section>
    <!--内容结束-->
</div>
</div>
{include file="common/bottom" /}
<script src="/static/lib/ueditor/ueditor.config.js"></script>
<script src="/static/lib/ueditor/ueditor.all.js">
</script>
<script>
    $(function () {
        UE.getEditor('content', {initialFrameHeight: 600});
    })
    $('#button').click(function () {
        var data = $('#form_data').serialize();
        $.ajax({
            url: "{:url('admin/project/edit')}",
            type: "POST",
            data: data,
            success: function (res) {
                if (res.code == 1) {
                    layer.msg(res.msg, {
                        icon: 6,
                        time: 2000
                    }, function () {
                        location.href = res.url;
                    })
                } else {
                    layer.open({
                        title: '修改失败！',
                        content: res.msg,
                        icon: 5
                    })
                }
            }
        })
    })
</script>
<script src="/static/lib/layui/layui/layui.js"></script>
<link rel="stylesheet" href="/static/lib/layui/layui/css/layui.css">
<script>
    layui.use('upload', function () {
        var upload = layui.upload;
        //执行实例
        var uploadInst = upload.render({
            elem: '.show_img' //绑定元素
            , url: '{:url("index/Img/index")}' //上传接口
            , field: 'upimg'
            , exts: 'jpg|png'
            , done: function (res) {
                //上传完毕回调
                layer.msg(res.msg, {time: 2000}, function () {
                    if (res.code == 1) {
                        $('input[name="show_img"]').val('/uploads/' + res.src);
                    }
                })
            }
            , error: function () {
                //请求异常回调
            }
        });
    });
</script>

<!--引入JS-->
<script type="text/javascript" src="/static/plugins/webuploader-0.1.5/webuploader.js"></script>
</body>
</html>
